from sqlalchemy import DateTime, String, Integer, Column, Text
from config.database import Base


class Monitor(Base):
    """
    监控管理表
    """

    __tablename__ = 'biz_monitor'

    monitor_id = Column(Integer, primary_key=True, nullable=False, comment='')
    device_id = Column(String(64), nullable=True, comment='设备ID')
    monitor_type = Column(String(16), nullable=True, comment='监控类型（smoking、drinking）')
    file_url = Column(String(255), nullable=True, comment='监控文件地址')
    file_type = Column(String(255), nullable=True, comment='监控文件类型')
    file_name = Column(String(255), nullable=True, comment='监控文件名')
    create_by = Column(String(255), nullable=True, comment='')
    create_time = Column(DateTime, nullable=True, comment='')
    update_by = Column(String(255), nullable=True, comment='')
    update_time = Column(DateTime, nullable=True, comment='')
    update_time = Column(DateTime, nullable=True, comment='')
    update_time = Column(DateTime, nullable=True, comment='')
    status = Column(String(1), nullable=True, comment='0-未解析，1-已解析')
    content = Column(Text, nullable=True, comment='解析内容')



